package nbpservice;

import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;

import entities.ExchangeRate;
import exceptions.NoSuchCurrencyException;
import exceptions.NoSuchDocumentException;

public interface NbpService
{
	final String address_prefix = "http://www.nbp.pl/kursy/xml/";
	final String available_xml_documents_list_file = "http://www.nbp.pl/kursy/xml/dir.txt ";
	final String xml_element_name = "pozycja";
	final String LIST_A = "a";
	final String LIST_B = "b";
	final String LIST_C = "c";
	final String LIST_H = "h";
	
	Map<String, ExchangeRate> getNewestExchangeRateMap(String type) 
			throws NoSuchDocumentException, IOException, SAXException, ParserConfigurationException, ParseException;
	
	ExchangeRate getNewestExchangeRateForGivenCurrencyCode(String currency_code) 
			throws NoSuchDocumentException, IOException, SAXException, ParserConfigurationException, ParseException, NoSuchCurrencyException;
	
	BigDecimal getNewestDecimalExchangeRateForGivenCurrencyCode(String currency_code) 
			throws NoSuchDocumentException, IOException, SAXException, ParserConfigurationException, ParseException, NoSuchCurrencyException;
}
